﻿<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="About.aspx.cs" Inherits="POS.About" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<script language="javascript" src="/Scripts/LodopFuncs.js"></script>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
	<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
</object> 

<script language="javascript" type="text/javascript">
    var LODOP; //声明为全局变量 
    function prn1_preview() {
        CreateOneFormPage();
        LODOP.PREVIEW();
    };
    function prn1_print() {
        CreateOneFormPage();
        LODOP.PRINT();
    };
    function prn1_printA() {
        CreateOneFormPage();
        LODOP.PRINTA();
    };
    function CreateOneFormPage() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单一");
        LODOP.SET_PRINT_STYLE("FontSize", 18);
        LODOP.SET_PRINT_STYLE("Bold", 1);
        LODOP.ADD_PRINT_TEXT(50, 231, 260, 39, "打印页面部分内容");
        LODOP.ADD_PRINT_HTM(88, 200, 350, 600, document.getElementById("form1").innerHTML);
    };
    function prn2_preview() {
        CreateTwoFormPage();
        LODOP.PREVIEW();
    };
    function prn2_manage() {
        CreateTwoFormPage();
        LODOP.PRINT_SETUP();
    };
    function CreateTwoFormPage() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单二");
        LODOP.ADD_PRINT_RECT(70, 27, 634, 242, 0, 1);
        LODOP.ADD_PRINT_TEXT(29, 236, 279, 38, "页面内容改变布局打印");
        LODOP.SET_PRINT_STYLEA(2, "FontSize", 18);
        LODOP.SET_PRINT_STYLEA(2, "Bold", 1);
        LODOP.ADD_PRINT_HTM(88, 40, 321, 185, document.getElementById("form1").innerHTML);
        LODOP.ADD_PRINT_HTM(87, 355, 285, 187, document.getElementById("form2").innerHTML);
        LODOP.ADD_PRINT_TEXT(319, 58, 500, 30, "注：其中《表单一》按显示大小，《表单二》在程序控制宽度(285px)内自适应调整");
    };
    function prn3_preview() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_全页");
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.documentElement.innerHTML);
        LODOP.PREVIEW();
    };	
</script> 
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        About
    </h2>
    <p>
        Put content here.
    </p>
    <input id="clickMe" type="button" value="clickme" onclick="prn1_preview()" />
    <%--<button id = "print" onclick = "prn1_preview()">try me!</button>--%>
    <p>1：若只打印《表单一》,看一下<a href="javascript:prn1_preview()">打印预览</a>,可<a href="javascript:prn1_print()">直接打印</a>也可      
<a href="javascript:prn1_printA()">选择打印机</a>打印。<br><br>
2：若《表单一》和《表单二》一起并列输出,看一下<a href="javascript:prn2_preview()">打印预览</a>,其布局风格可<a href="javascript:prn2_manage()">打印维护</a>调整。
<p>3：若打印整个页面,看看<a href="javascript:prn3_preview()">打印预览</a>。<br><br>
本例要点是用Document的innerHTML方法把打印目标的超文本送给控件。  
<p><a href="PrintSampIndex.html">&lt;&lt;回样例目录</a>
</p>   

</asp:Content>
